FROM python:2.7.9
ENV APP_ROOT /data/code
WORKDIR ${APP_ROOT}/
COPY requirements.txt ${APP_ROOT}/
RUN pip install --no-cache-dir --trusted-host mirrors.aliyun.com --upgrade pip
RUN pip install --no-cache-dir --trusted-host mirrors.aliyun.com -i http://mirrors.aliyun.com/pypi/simple/ -r requirements.txt
COPY . ${APP_ROOT}
RUN find . -name "*.pyc" -delete
CMD ["python","-m","server.server"]

